package com.alks.function.mapper;

import com.alks.entity.data.entity.MpPurDis;
import com.alks.function.data.dto.MpPurDisConditionDto;
import com.alks.function.data.dto.MpPurDisDto;
import com.alks.function.data.request.MpPurDisRequest2;
import com.alks.function.data.request.stockdept.pcfactorystockwork.AddPurSendRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface MpPurDisMapper extends BaseMapper<MpPurDis> {

    /**
     * 材料订购明细
     * @param request
     * @return
     */
    List<MpPurDisDto> getMaterialOrderDetails(MpPurDisRequest2 request);

    /**
     * 统计订购数量
     * @param request
     * @return
     */
    float getMaterialOrderCount(MpPurDisRequest2 request);

    /**
     * 统计金额
     * @param request
     * @return
     */
    BigDecimal getMaterialAMTCount(MpPurDisRequest2 request);

    /**
     * 采购员
     * @return
     * @param companyId
     */
    List<String> getSysUser(String companyId);

    /**
     * 厂商
     * @return
     * @param companyId
     */
    List<MpPurDisConditionDto> getVendorName(String companyId);

    /**
     * 获取补料暂收数据
     *
     * @param sentRequest 请求参数
     * @param companyId 公司id
     * @param slipType 单据类型
     * @return 返回结果
     */
    MpPurDis blSentQuery(@Param("sentRequest") AddPurSendRequest sentRequest, @Param("companyId") String companyId, @Param("slipType") int slipType);
}
